package br.com.moxirpt.test.testcase;

public class GeradorCodRandomico {

	public static int getCodAleatorio(){
		
		int value1 =(int) (Math.random()* 9);
		while ( value1 == 0  || value1 != 1){
			value1 =(int) (Math.random()* 9);
		}
		
		int value2 =(int) (Math.random()* 9);
/*		while ( value2 == 0 ){
			value2 =(int) (Math.random()* 9);
		}
*/		
		int value3 =(int) (Math.random()* 9);
		/*if ( value3 == 0 ){
			value3 =(int) (Math.random()* 9);
		}*/
		
		int value4 =(int) (Math.random()* 9);
		if ( value4 == 0  ){
			value4 =(int) (Math.random()* 9);
		}
		
		String sValue = ("" + value1 + value2 + value3 + value4  );
		
		
		
		return Integer.parseInt(sValue);
	}
	
}
